<!DOCTYPE HTML>
<html lang="en">
<head>
    <title>元数据配置</title>

    <meta http-equiv="x-ua-compatible" content="ie=edge"/>
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    <meta name="renderer" content="webkit"/>
    <!--toast-->
    <link href="../metronic/assets/global/plugins/jquery.toast.css " rel="stylesheet"/>
    <script src="../metronic/assets/global/plugins/jquery.min.js" type="text/javascript"></script>
    <script src="../metronic/assets/global/plugins/jquery.toast.min.js" type="text/javascript"></script>

    <!-- BEGIN GLOBAL MANDATORY STYLES -->
    <link href="../metronic/assets/global/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet"
          type="text/css"/>
    <link href="../metronic/assets/global/plugins/simple-line-icons/simple-line-icons.min.css" rel="stylesheet"
          type="text/css"/>
    <link href="../metronic/assets/global/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
    <link href="../metronic/assets/global/plugins/uniform/css/uniform.default.css" rel="stylesheet" type="text/css"/>
    <link href="../metronic/assets/global/plugins/bootstrap-switch/css/bootstrap-switch.min.css" rel="stylesheet"
          type="text/css"/>
    <!-- END GLOBAL MANDATORY STYLES -->
    <!-- BEGIN PAGE LEVEL STYLES -->
    <link rel="stylesheet" type="text/css"
          href="../metronic/assets/global/plugins/jstree/dist/themes/default/style.min.css"/>
    <link rel="stylesheet" type="text/css" href="../metronic/assets/global/plugins/select2/select2.css"/>
    <link rel="stylesheet" type="text/css"
          href="../metronic/assets/global/plugins/datatables/plugins/bootstrap/dataTables.bootstrap.css"/>
    <link rel="stylesheet" type="text/css"
          href="../metronic/assets/global/plugins/bootstrap-touchspin/bootstrap.touchspin.min.css"/>
    <!-- END PAGE LEVEL STYLES -->
    <!-- BEGIN THEME STYLES -->
    <link rel="stylesheet" type="text/css"
          href="../metronic/assets/global/plugins/jquery-multi-select/css/multi-select.css"/>
    <link href="../metronic/assets/global/css/components.css" id="style_components" rel="stylesheet" type="text/css"/>
    <link href="../theme/zTree/metroStyle/metroStyle.css" rel="stylesheet" type="text/css"/>
    <link rel="stylesheet" type="text/css" href="../metronic/assets/global/plugins/bootstrap/css/bootstrap-table.css"/>
    <link rel="stylesheet" type="text/css"
          href="../metronic/assets/global/plugins/bootstrap/css/bootstrap-editable.css"/>
    <link rel="stylesheet" type="text/css"
          href="../metronic/assets/global/plugins/bootstrap/css/bootstrap-table-fixed-columns.css"/>
    <!-- END THEME STYLES -->
    <style type="text/css">
        .form-horizontal .form-group {
            margin-right: 0px;
            margin-left: 0px;
        }

        .table {
            border-top: solid 3px #f3565d;
        }

        #tab_left .active {
            border-left: solid 3px #F3565D;
        }

        .select2-container .select2-choice {
            height: 30px !important;
            border-radius: 4px !important;
        }

        .select2-drop {
            z-index: 10100;
        }

        html, body {
            height: 100%;
        }

        .portlet-body {
            height: 100vh;
        }


    </style>


    <!--<script src="../metronic/assets/global/plugins/jquery.min.js" type="text/javascript"></script>-->
    <script src="../metronic/assets/global/plugins/jquery-migrate.min.js" type="text/javascript"></script>
    <!-- IMPORTANT! Load jquery-ui.min.js before bootstrap.min.js to fix bootstrap tooltip conflict with jquery ui tooltip -->
    <script src="../metronic/assets/global/plugins/jquery-ui/jquery-ui.min.js" type="text/javascript"></script>
    <script src="../metronic/assets/global/plugins/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
    <script src="../metronic/assets/global/plugins/bootstrap-hover-dropdown/bootstrap-hover-dropdown.min.js"
            type="text/javascript"></script>
    <script src="../metronic/assets/global/plugins/jquery-slimscroll/jquery.slimscroll.min.js"
            type="text/javascript"></script>
    <script src="../metronic/assets/global/plugins/jquery.blockui.min.js" type="text/javascript"></script>
    <script src="../metronic/assets/global/plugins/jquery.cokie.min.js" type="text/javascript"></script>
    <script src="../metronic/assets/global/plugins/uniform/jquery.uniform.min.js" type="text/javascript"></script>
    <script src="../metronic/assets/global/plugins/bootstrap-switch/js/bootstrap-switch.min.js"
            type="text/javascript"></script>
    <script src="../metronic/assets/global/plugins/bootbox/bootbox.min.js" type="text/javascript"></script>
    <!-- END CORE PLUGINS -->
    <!-- BEGIN PAGE LEVEL PLUGINS -->
    <script src="../metronic/assets/global/plugins/bootstrap-select/bootstrap-select.min.js"
            type="text/javascript"></script>
    <script src="../metronic/assets/global/plugins/jquery-multi-select/js/jquery.multi-select.js"
            type="text/javascript"></script>
    <script src="../metronic/assets/global/plugins/select2/select2.min.js" type="text/javascript"></script>
    <script src="../metronic/assets/global/plugins/select2/select2_locale_zh-CN.js"></script>
    <script src="../metronic/assets/global/plugins/bootstrap-touchspin/bootstrap.touchspin.min.js"
            type="text/javascript"></script>
    <!-- END PAGE LEVEL PLUGINS -->
    <script src="../js/zTree/jquery.ztree.core.min.js" type="text/javascript"></script>
    <script src="../metronic/assets/global/scripts/metronic.js" type="text/javascript"></script>
    <script src="../metronic/assets/global/plugins/bootstrap/js/bootstrap-table.js" type="text/javascript"></script>
    <script src="../metronic/assets/global/plugins/bootstrap/js/bootstrap-table-zh-CN.js" type="text/javascript"></script>
    <script src="../metronic/assets/global/plugins/bootstrap/js/bootstrap-editable.js" type="text/javascript"></script>
    <script src="../metronic/assets/global/plugins/bootstrap/js/bootstrap-table-editable.js"
            type="text/javascript"></script>
    <script src="../metronic/assets/global/plugins/bootstrap/js/bootstrap-table-fixed-columns.js"
            type="text/javascript"></script>
    <script src="../metronic/assets/main/layout/scripts/layout.js" type="text/javascript"></script>
    <script src="../metronic/assets/global/plugins/horizontal-timeline/horizontal-timeline.min.js"
            type="text/javascript"></script>
    <script src="../js/systemManager/systemDataConfig.js" type="text/javascript"></script>
</head>

<body class="page-header-fixed page-quick-sidebar-over-content "
      style="width: 98%;height: 100%; background: #0f0; background-color: transparent;">
<div class="row" style="height: 100%;">
    <!--Begin Right Content-->
    <div class="col-md-12">
        <div id="right_cusom" class="portlet box blue-steel" style=" background-color:#FFF;">
            <!--<div id="right_cusom" class="portlet box blue-steel" style="min-height:655px; background-color:#FFF;">-->
            <div class=" portlet-title">
                <div class="caption">
                    <i class="fa fa-gift"></i>元数据表配置
                </div>
                <div class="actions">
                    <a href="javascript:goback();" class="btn btn-default btn-sm">
                        <i class="fa fa-backward"></i> 返回
                    </a>
                </div>
            </div>
            <div class="portlet-body">
                <div class="tabbable-custom nav-justified">
                    <ul id="myTab" class="nav nav-tabs nav-justified disable">
                        <li class="active">
                            <a id="a_tab_table" href="#tab_1_1_1" data-toggle="tab">
                                表信息配置
                            </a>
                        </li>
                        <li>
                            <a id="a_tab_field" href="#tab_1_1_2" data-toggle="tab">
                                字段配置
                            </a>
                        </li>
                        <li>
                            <a id="a_tab_fieldEnum" href="#tab_1_1_3" data-toggle="tab">
                                字段枚举配置
                            </a>
                        </li>
                        <li>
                            <a id="a_tab_view" href="#tab_1_1_4" data-toggle="tab">
                                预览
                            </a>
                        </li>
                    </ul>
                    <div class="tab-content" style="height:525px; overflow:auto;">
                        <div class="tab-pane active" id="tab_1_1_1" style="margin-top:30px">
                            <div class="form-horizontal form-body form-inline">
                                <div class="form-group" style="margin-left: 150px">
                                    <label class="col-md-4 control-label">&nbsp;&nbsp;数据源表:</label>
                                    <div class="col-md-4">
                                        <select id="dtName" name="dtName"
                                                class="js-example-basic-single input-inline input-medium "> </select>
                                    </div>
                                </div>
                                <div class="form-group" style="margin-left: 100px">
                                    <label class="col-md-4 control-label">&nbsp;&nbsp;&nbsp;&nbsp;表标识:</label>
                                    <div class="col-md-4">
                                        <input id="dtConfigId" name="dtConfigId" type="text"
                                               class="form-control input-inline input-medium" placeholder="表标识唯一,不能重复"/>
                                    </div>
                                </div>
                                <hr/>
                                <div class="form-group" style="margin-left: 150px">
                                    <label class="col-md-4 control-label">表中文名称:</label>
                                    <div class="col-md-4">
                                        <input id="dtNameCn" name="dtNameCn" type="text"
                                               class="form-control input-inline input-medium" placeholder="请输入表中文名称"/>
                                    </div>
                                </div>
                                <div class="form-group" style="margin-left: 100px">
                                    <label class="col-md-4 control-label" style="margin-left: -5px">排序字段:</label>
                                    <div class="col-md-4">
                                        <input id="dtOrder" name="dtOrder" type="text"
                                               class="form-control input-inline input-medium" placeholder="请输入默认排序字段"/>
                                    </div>
                                </div>
                                <hr/>
                                <div class="form-group" style="margin-left: 150px">
                                    <label class="col-md-4 control-label">数据源标识:</label>
                                    <div class="col-md-4">
                                        <input id="dtConn" name="dtConn" type="text"
                                               class="form-control input-inline input-medium" readonly="readonly"/>
                                    </div>
                                </div>
                                <div class="form-group" style="margin-left: 100px">
                                    <label class="col-md-4 control-label"
                                           style="margin-left: -3px">&nbsp;&nbsp;表主键:</label>
                                    <div class="col-md-4">
                                        <input id="dtPrimarykey" name="dtPrimarykey" type="text"
                                               class="form-control input-inline input-medium" readonly="readonly"/>
                                    </div>
                                </div>
                                <hr/>
                                <div class="form-group" style="margin-left: 166px">
                                    <label class="col-md-4 control-label" style="margin-left:-12px;">表说明信息:</label>
                                    <div class="col-md-7">
                                        <input id="dtRemark" name="dtRemark" type="text"
                                               class="form-control input-inline input-medium" style="width:100%;"
                                               placeholder="请输入表说明信息"/>
                                    </div>
                                </div>
                                <hr/>
                                <div class="form-group">
                                    <button id="btn_tableSave" type="button" style="margin-left: 1010px;"
                                            class="btn blue-steel">保&nbsp;&nbsp;存
                                    </button>
                                    <span id="valide_dtMessage" class="help-inline" style="color:red;"></span>
                                </div>
                            </div>
                        </div>
                        <div class="tab-pane" id="tab_1_1_2">
                            <div class="table-toolbar">
                                <div class="btn-group">
                                    <button id="btn_fieldAdd" class="btn blue-steel"><i class="fa fa-plus"></i>新增字段
                                    </button>
                                </div>
                                <div class="btn-group">
                                    <button id="btn_fieldUpdate" class="btn blue-steel"><i class="fa fa-plus"></i>修改字段
                                    </button>
                                </div>

                                <div class="btn-group">
                                    <button id="btn_fieldDel" class="btn blue-steel"><i class="fa fa-remove"></i>删除字段
                                    </button>
                                </div>
                            </div>
                            <table id="tb_fieldList"></table>
                        </div>
                        <div class="tab-pane" id="tab_1_1_3">
                            <div class="table-toolbar">
                                <div class="btn-group">
                                    <button id="btn_enumAdd" class="btn blue-steel"><i class="fa fa-plus"></i>添加
                                    </button>
                                </div>
                                <div class="btn-group">
                                    <button id="btn_enumEdit" class="btn blue-steel"><i class="fa fa-edit"></i>修改
                                    </button>
                                </div>
                                <div class="btn-group">
                                    <button id="btn_enumDel" class="btn blue-steel"><i class="fa fa-remove"></i>删除
                                    </button>
                                </div>
                            </div>
                            <table id="tb_enumList"></table>
                        </div>
                        <div class="tab-pane" id="tab_1_1_4">
                            <table id="tb_viewList"></table>
                        </div>

                    </div>
                </div>
            </div>
        </div>
    </div>
    <!--End Right Content-->
</div>
<!-- Begin隐藏域 -->
<input type="hidden" id="hid_IsMark" name="hid_IsMark"/>
<input type="hidden" id="hid_dtguid" name="hid_dtguid"/>
<input type="hidden" id="hid_dtConfigId" name="hid_dtConfigId"/>
<input type="hidden" id="hid_dbkey" name="hid_dbkey"/>
<input type="hidden" id="hid_fieldconfigid" name="hid_fieldconfigid"/>
<input type="hidden" id="hid_enumguid" name="hid_enumguid"/>
<!-- End隐藏域 -->
<!-- Begin弹窗 -->
<div id="FieldModul" class="modal fade" tabindex="-1" aria-hidden="true">
    <div id="FieldDialog" >
        <div class="modal-content">
            <div class="modal-header" style="padding:8px; background-color:#4276A4;">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
                <span class="modal-title" style="color:#fff; font-size:16px;">新增字段</span>
            </div>
            <div class="modal-body">
                <iframe id="fieldIframe" name="fieldIframe" style="width:97%; height:500px; border:solid 0px red;"
                        src=""></iframe>
            </div>
        </div>
    </div>
</div>

<!-- End弹窗 -->
<!-- Begin字段枚举维护弹窗 -->
<div id="enumModul" class="modal fade" tabindex="-1" aria-hidden="true">
    <div id="enumDialog" class="modal-dialog">
        <div class="modal-content" style="width:500px;">
            <div class="modal-header" style="padding:8px; background-color:#4276A4;">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
                <span class="modal-title" style="color:#fff; font-size:16px;">字段枚举维护</span>
            </div>
            <div class="modal-body">
                <div class="form-horizontal form-body">
                    <div class="form-group">
                        <label class="col-md-3 control-label">字段名称:</label>
                        <div class="col-md-4">
                            <select id="fieldname" name="fieldname"
                                    class="js-example-basic-single input-inline input-medium"> </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-3 control-label">枚举Code:</label>
                        <div class="col-md-4">
                            <input id="enumcode" name="enumcode" type="text"
                                   class="form-control input-inline input-medium" placeholder="请输入枚举Code"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-3 control-label">枚举名称:</label>
                        <div class="col-md-4">
                            <input id="enumname" name="enumname" type="text"
                                   class="form-control input-inline input-medium" placeholder="请输入枚举名称"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-3 control-label">枚举类型:</label>
                        <div class="col-md-4">
                            <select id="enumtype" name="enumtype" class="form-control input-inline input-medium">
                                <option value="0">自定义JSON</option>
                                <option value="1">SQL语句</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-3 control-label">枚举值:</label>
                        <div class="col-md-4">
                            <textarea rows="3" id="enumvalue" name="enumvalue" type="text"
                                      class="form-control input-inline input-medium">
                            </textarea>

                            <div style="font-size:8px; color:red;" class="input-inline input-medium">
                                JSON格式{'key':'value','key':'value'}
                            </div>
                            <div style="font-size:8px; color:red;" class="input-medium">SQL格式select xxxfield
                                enum_key,xxxfield enum_value from xxxtable
                            </div>
                        </div>
                    </div>
                    <hr/>
                    <div class="form-group">
                        <button id="btn_enumSave" type="button" class="btn blue-steel" style="margin-left:40px;">保&nbsp;&nbsp;存</button>
                        <span id="enumError" style="color:red; margin-left:25px;"></span>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- End字段枚举维护弹窗 -->

<!-- <\!--<script src="../metronic/assets/global/plugins/jquery.min.js" type="text/javascript"></script>-\-> -->
<!-- <script src="../metronic/assets/global/plugins/jquery-migrate.min.js" type="text/javascript"></script> -->
<!-- <\!-- IMPORTANT! Load jquery-ui.min.js before bootstrap.min.js to fix bootstrap tooltip conflict with jquery ui tooltip -\-> -->
<!-- <script src="../metronic/assets/global/plugins/jquery-ui/jquery-ui.min.js" type="text/javascript"></script> -->
<!-- <script src="../metronic/assets/global/plugins/bootstrap/js/bootstrap.min.js" type="text/javascript"></script> -->
<!-- <script src="../metronic/assets/global/plugins/bootstrap-hover-dropdown/bootstrap-hover-dropdown.min.js" -->
<!--         type="text/javascript"></script> -->
<!-- <script src="../metronic/assets/global/plugins/jquery-slimscroll/jquery.slimscroll.min.js" -->
<!--         type="text/javascript"></script> -->
<!-- <script src="../metronic/assets/global/plugins/jquery.blockui.min.js" type="text/javascript"></script> -->
<!-- <script src="../metronic/assets/global/plugins/jquery.cokie.min.js" type="text/javascript"></script> -->
<!-- <script src="../metronic/assets/global/plugins/uniform/jquery.uniform.min.js" type="text/javascript"></script> -->
<!-- <script src="../metronic/assets/global/plugins/bootstrap-switch/js/bootstrap-switch.min.js" -->
<!--         type="text/javascript"></script> -->
<!-- <script src="../metronic/assets/global/plugins/bootbox/bootbox.min.js" type="text/javascript"></script> -->
<!-- <\!-- END CORE PLUGINS -\-> -->
<!-- <\!-- BEGIN PAGE LEVEL PLUGINS -\-> -->
<!-- <script src="../metronic/assets/global/plugins/bootstrap-select/bootstrap-select.min.js" -->
<!--         type="text/javascript"></script> -->
<!-- <script src="../metronic/assets/global/plugins/jquery-multi-select/js/jquery.multi-select.js" -->
<!--         type="text/javascript"></script> -->
<!-- <script src="../metronic/assets/global/plugins/select2/select2.min.js" type="text/javascript"></script> -->
<!-- <script src="../metronic/assets/global/plugins/select2/select2_locale_zh-CN.js"></script> -->
<!-- <script src="../metronic/assets/global/plugins/bootstrap-touchspin/bootstrap.touchspin.min.js" -->
<!--         type="text/javascript"></script> -->
<!-- <\!-- END PAGE LEVEL PLUGINS -\-> -->
<!-- <script src="../js/zTree/jquery.ztree.core.min.js" type="text/javascript"></script> -->
<!-- <script src="../metronic/assets/global/scripts/metronic.js" type="text/javascript"></script> -->
<!-- <script src="../metronic/assets/global/plugins/bootstrap/js/bootstrap-table.js" type="text/javascript"></script> -->
<!-- <script src="../metronic/assets/global/plugins/bootstrap/js/bootstrap-table-zh-CN.js" type="text/javascript"></script> -->
<!-- <script src="../metronic/assets/global/plugins/bootstrap/js/bootstrap-editable.js" type="text/javascript"></script> -->
<!-- <script src="../metronic/assets/global/plugins/bootstrap/js/bootstrap-table-editable.js" -->
<!--         type="text/javascript"></script> -->
<!-- <script src="../metronic/assets/global/plugins/bootstrap/js/bootstrap-table-fixed-columns.js" -->
<!--         type="text/javascript"></script> -->
<!-- <script src="../metronic/assets/main/layout/scripts/layout.js" type="text/javascript"></script> -->
<!-- <script src="../metronic/assets/global/plugins/horizontal-timeline/horizontal-timeline.min.js" -->
<!--         type="text/javascript"></script> -->
<!-- <script src="../js/systemManager/systemDataConfig.js" type="text/javascript"></script> -->
</body>
</html>
